User Function SetNomPrd()

Local aArea := GetArea()

DbSelectArea('SD1')
DbSetOrder(1)
DbGoTop()

While !EOF()
	
	RecLock('SD1',.F.)
	
	SD1->D1_XNMPROD	:=	Posicione('SB1',1,xFilial('SB1') + D1_COD,'B1_DESC','')
	
	MsUnlock()
	
	DbSkip()
	
End

RestArea(aArea)

Return
